package com.aiq.controller;

import com.aiq.service.AdminService;
import com.aiq.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @ClassName: AdminController
 * @Description:
 * @Author: vie0134
 * @Date: 2021-01-11 16:43
 * @Version: 1.0
 **/
@RestController
@Api(tags = "实现管理员各种操作")
public class AdminController {
    @Autowired
    private AdminService adminService;

    @ApiOperation(value = "实现登录",notes = "实现登录")
    @RequestMapping(value = "/admin/login/status", method = RequestMethod.POST)
    public R loginStatus(@RequestBody String name, String password, HttpServletRequest request) {
        return adminService.verifyPassword(name, password);
    }
}
